package com.example.dqreptile.service.impl;

import com.example.dqreptile.dao.ISkillRepository;
import com.example.dqreptile.entity.Skill;
import com.example.dqreptile.service.ISkillService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.Optional;

@Service
public class ISkillSaveImpl implements ISkillService {


    @Autowired
    private ISkillRepository iSkillRepository;

    @Override
    public Skill saveSkill(Skill skill) {
        return this.iSkillRepository.save(skill);
    }

    @Override
    public Skill findOne(Integer id) {
       return this.iSkillRepository.findById(id).orElse(null);
    }
}
